home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-04-21 | 2.8 KB | 105 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: BmpPart.h
- // Release Version: $ 1.0d1 $
- //
- // Author: Henri Lamiraux
- // Creation Date: 3/28/94
- //
- // Copyright: © 1993, 1994 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef BMPPART_H
- #define BMPPART_H
-
- #ifndef BMPDEF_H
- #include "BmpDef.h"
- #endif
-
- // ----- Famework Includes -----
-
- #ifndef FWPART_H
- #include "FWPart.h"
- #endif
-
- // ----- Graphic Includes -----
-
- #ifndef FWBMPSHP_H
- #include "FWBMPShp.h"
- #endif
-
- //========================================================================================
- // •• Constants
- //========================================================================================
-
- const short kDisplayMenu = 4;
-
- // ----- Commands -----
- const XMPCommandID cHalfSize = 1;
- const XMPCommandID cRealSize = cHalfSize + 1;
- const XMPCommandID cDoubleSize = cRealSize + 1;
- const XMPCommandID cCustomSize = -1;
-
- //========================================================================================
- // •• Forward Declarations
- //========================================================================================
-
- class CBitmapSelection;
- class FW_CRect;
-
- //========================================================================================
- // •• class CBitmapPart
- //========================================================================================
-
- class CBitmapPart : public FW_CPart
- {
- //----------------------------------------------------------------------------------------
- // • Initialization/Destruction
- //
- public:
- CBitmapPart();
- virtual ~ CDECL CBitmapPart();
-
- virtual void Initialize();
- virtual void Release();
-
- //----------------------------------------------------------------------------------------
- // • Inherited API
- //
- public:
- virtual void InternalizeContent(XMPStorageUnit* storageUnit);
- virtual void ExternalizeContent(XMPStorageUnit* storageUnit);
-
- virtual XMPValueType GetContentPropertyValueType() const;
-
- virtual FW_CFrame* NewFrame(XMPFrame* xmpFrame, XMPTypeToken presentation);
- virtual FW_CSelection* NewSelection();
-
- virtual void DoAdjustMenus(XMPMenuBar* menuBar);
-
- virtual FW_Boolean DoIdle();
-
- //----------------------------------------------------------------------------------------
- // • New API
- //
- public:
- FW_CBitmapShape GetBitmapShape() const
- {return fBitmapShape;}
- void SetBitmap(FW_CBitmapShape bitmapShape);
-
- void CalcBitmapRect(FW_CRect *rect, long zoomFactor) const;
-
- CBitmapSelection* GetBitmapSelection() const
- {return fBitmapSelection;}
-
- //----------------------------------------------------------------------------------------
- // • Data Members
- //
- private:
- FW_CBitmapShape fBitmapShape;
- MenuHandle fDisplayMenu;
- CBitmapSelection* fBitmapSelection;
- };
- #endif
-